home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / lib / H / tmp / pdir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  1.6 KB  |  70 lines

  1. /*
  2.  * pdir.h --
  3.  *    POSTGRES directory path definitions.
  4.  *
  5.  * Identification:
  6.  *    $Header: /private/postgres/src/lib/H/tmp/RCS/pdir.h,v 1.2 1990/08/17 08:54:31 cimarron Exp $
  7.  */
  8.  
  9. #ifndef    PDirIncluded        /* Include this file only once */
  10. #define PDirIncluded    1
  11.  
  12. #include "tmp/c.h"
  13.  
  14. #define PDIR_H    "$Header: /private/postgres/src/lib/H/tmp/RCS/pdir.h,v 1.2 1990/08/17 08:54:31 cimarron Exp $"
  15.  
  16. /*
  17.  * GetDatabasePath --
  18.  *    Returns path to database.
  19.  *
  20.  * Exceptions:
  21.  *    BadState if called before InitDatabase.
  22.  */
  23. extern
  24. String        /* XXX Path */
  25. GetDatabasePath ARGS((
  26.     void
  27. ));
  28.  
  29. /*
  30.  * GetDatabaseName --
  31.  *    Returns name of database.
  32.  *
  33.  * Exceptions:
  34.  *    BadState if called before InitDatabase.
  35.  */
  36. extern
  37. String        /* XXX Name */
  38. GetDatabaseName ARGS((
  39.     void
  40. ));
  41.  
  42. /*
  43.  * InitDatabase --
  44.  *    Sets current directory appropriately for given path and name.
  45.  *
  46.  * Arguments:
  47.  *    Path and name are invalid if it invalid as a string.
  48.  *    Path is "badly formated" if it is not a string containing a path
  49.  *    to a writable directory.
  50.  *    Name is "badly formated" if it contains more than 16 characters or if
  51.  *    it is a bad file name (e.g., it contains a '/' or an 8-bit character).
  52.  *
  53.  * Side effects:
  54.  *    Initially, DatabasePath and DatabaseName are invalid.  They are
  55.  *    set to valid strings before this function returns.
  56.  *
  57.  * Exceptions:
  58.  *    BadState if called more than once.
  59.  *    BadArg if both path and name are "badly formated" or invalid.
  60.  *    BadArg if path and name are both "inconsistent" and valid.
  61.  */
  62. extern
  63. void
  64. InitDatabase ARGS((
  65.     String    path,    /* XXX Path */
  66.     String    name    /* XXX Name */
  67. ));
  68.  
  69. #endif    /* !defined(PDirIncluded) */
  70.